1. Field of the Invention
The invention relates to an echo canceller for canceling an echo signal which becomes a deterioration factor of a speech quality in satellite communications and telephones with loudspeakers.
2. Description of the Prior Art
An example of conventional echo cancellers is disclosed in (1) xe2x80x9cEcho canceller techniquexe2x80x9d, Japan Industrial Technical Center, Dec. 20, 1986, pp. 129-130. An example of the filter coefficient substitution method of conventional echo cancellers is disclosed in (2) the laid-open patent publication No. 62-24726. The construction of the conventional echo canceller is explained below, along with FIGS. 8-14.
FIG. 8 is a block diagram of the conventional echo canceller 30 explained in the above literature (1). In FIG. 8, Rin (k) represents a reception signal at k (where, k represents a certain time of digital signal), in other words it represents the voice of the caller at the far end. In case of an echo canceller used for a telephone with a speaker, an echo path 1 corresponds to a path in which the voice of the far-end caller, reproduced from the speaker, goes into a microphone via sound space. And in case of the echo canceller used for satellite communication channel, the echo path 1 represents the path in which the voice of the far-end caller leaks out to that of the near end talker by impedance mismatching of a hybrid transformer used for two-line/four line conversion.
Since the echo signal passes through the echo path 1, the reception signal Rin (k) is superposed on the near-end voice Nin (k). Therefore, a transmission signal Tin (k) contains not only the near-end voice but also the superposed far-end voice echo. If Tin (k) is transmitted to the far-end as it is, the communication quality deteriorates. In the echo canceller 30, an adaptive filter 3 generates a pseudo echo signal Tinxe2x80x2 (k). An echo subtracter 2 subtracts the pseudo echo signal Tinxe2x80x2 (k) from the transmission signal Tin (k) to generate a residual signal Res (k) in which the echo component is canceled. The residual signal Res (k) is transmitted to the far-end.
An adaptive controller 4 controls the adaptive filter 3. When the double-talk is detected, in other words when the far-end caller and the near-end caller are both speaking simultaneously, the adaptive controller 4 stops the adaptation. When only the far-end caller is speaking, the adaptive controller 4 outputs an adaptive control flag FLG to the adaptive filter 3 in order to activate the adaptation.
The adaptive controller 4 will hereinafter be described further in detail, using FIG. 9. FIG. 9 shows the adaptive controller 4 in the conventional echo canceller which is disclosed in the above literature (1). A level calculator 5 calculates logarithmically converted power of the reception signal Rin (k), in other words calculates a reception signal level Lrin (k) from a time k to a time prior to the L-th sampling according to formula (1), and outputs its result. A level calculator 6 calculates logarithmically converted power of the residual signal Res (k), in other words calculates the residual signal level Lres (k) from a time k to a time prior to the L-th sampling according to formula (2), and outputs its result. Then a level difference calculator 7 calculates DL (k), a level difference between the reception signal level Lrin (k) and the residual signal level Lres (k), according to formula (3). In the following formulas, L denotes a duration from a time k to a time prior to the L-th sampling, N denotes an average number to ensure the level difference DL (k).                               Lrin          ⁢                      xe2x80x83                    ⁢                      (            k            )                          =                              log            10                    ⁢                      {                                          ∑                                  i                  =                                      k                    -                    L                    +                    1                                                  k                            ⁢                              Rin                ⁢                                  xe2x80x83                                ⁢                                                      (                    i                    )                                    2                                                      }                                              (        1        )                                          Lres          ⁢                      xe2x80x83                    ⁢                      (            k            )                          =                              log            10                    ⁢                      {                                          ∑                                  i                  =                                      k                    -                    L                    +                    1                                                  k                            ⁢                              Res                ⁢                                  xe2x80x83                                ⁢                                                      (                    i                    )                                    2                                                      }                                              (        2        )                                          DL          ⁡                      (            k            )                          =                              ∑                          i              =                              k                -                N                +                1                                      k                    ⁢                                    {                                                Lrin                  ⁢                                      xe2x80x83                                    ⁢                                      (                    i                    )                                                  -                                  Lres                  ⁢                                      xe2x80x83                                    ⁢                                      (                    i                    )                                                              }                        /            N                                              (        3        )            
The level difference DL (k) is equal to the sum of the amount of echo loss via the echo path and the amount of echo canceling by the echo canceller. A level compensator 8 calculates an estimated residual signal level Lresxe2x80x2 (k) according to formula (4).
Lresxe2x80x2(k)=Lrin (k)xe2x88x92DL(k)
Where, Lresxe2x80x2 (k) represents an estimated value of the residual signal level Lres (k) at the time when only the echo signal of the reception signal exists in the transmission signal Tin (k), in other words when only the far-end caller is speaking.
The comparator 9 compares the residual signal level Lres (k) and the estimated residual signal Lresxe2x80x2 (k). In case that the result meets the conditional formula (5) below, the comparator 9 judges that both the far-end caller and the near-end caller are speaking, that is to say, that double-talk condition is occurred. Then the comparator 9 sets the adaptive control flag FLG to xe2x80x9c0xe2x80x9d in order to stop the adaptation of the adaptive filter.
Lres k) greater than Lresxe2x80x2(k)
Where, FLG=xe2x80x9c1xe2x80x9d represents the activation order of the adaptation, and FLG=xe2x80x9c0xe2x80x9d represents the deactivation order of the adaptation.
Adaptation control is a process in which whether the near-end voice level reaches a level for stopping the adaptation processing is judged, then the activation or the deactivation of the adaptation is controlled. The activation and the deactivation of the adaptation should be controlled according to a relationship between the echo signal level in the transmission signal Tin (k) and the near-end voice level. When the level of near-end voice exceeds the level of the echo signal by the far-end signal, the adaptation processing is deactivated. On the other hand, as shown in FIGS. 10Axcx9c10D, in case that the echo signal level exceeds the near-end voice level, or in case that the echo signal level exceeds the value added to the near-end voice level by a certain margin, the adaptation should be activated. FIG. 10A shows a relationship between the near end voice level Nin (k) and the echo signal level Rinxe2x80x2 (k). FIG. 10B shows a near-end voice sections in the reception signals Tin (k). FIG. 10C shows an echo signal section in the reception signals Tin (k). FIG. 10D shows sections where the adaptation of the conventional adaptive filter should be executed.
FIG. 11A shows a relationship between the near end voice level Nin (k) and the echo signal level Rinxe2x80x2 (k). FIG. 11B shows near-end voice sections in the reception signals Tin (k). FIG. 11C shows an echo signal section in the reception signals Tin (k). FIG. 11D shows a relationship between residual signal level Lres (k) and the estimated residual signal level Lresxe2x80x2 (k). FIG. 11D shows sections where the adaptation of the conventional adaptive filter is executed.
In the conventional art, the double talk is detected from the residual signal level Lres (k) and the estimated residual signal level Iresxe2x80x2 (k) in the comparator 9. Therefore, if the residual signal level Lres (k) and the estimated residual signal level Lresxe2x80x2 (k) are nearly equal, as shown in FIG. 11D, the adaptation is deactivated by partly mis-detecting the condition as double talk condition even in a section (a) where only the echo signal is contained in the transmission signal Tin (k). In addition, if the residual signal level Lres (k) exceeds the estimated residual signal level Lresxe2x80x2 (k) adaptation is deactivated, even in a section (b) shown in FIG. 11 where the adaptation should be carried out because echo signal level exceeds the near-end voice level.
FIGS. 12Axcx9c12E shows another example of relationship between the near end voice level and the echo signal level and sections where the adaptation of the conventional adaptive filter is executed. In FIGS. 12Axcx9cFIG. 12E, if the residual signal level Lres (k) exceeds the estimated residual signal level Lresxe2x80x2 (k), adaptation is deactivated, even in a section (b) shown in FIG. 12C where the adaptation should be carried out because echo signal level exceeds the near-end voice level.
The construction of filter coefficient substitution method in the conventional echo canceller is explained below, using FIG. 13 and FIGS. 14Axcx9cFIG. 14C.
FIG. 13 is a block diagram of the conventional echo canceller disclosed in the above literature (2). The construction of the conventional example of FIG. 13 is different from that of the conventional example in FIG. 8, in that FIG. 13 comprises a switch means 12, a refuge memory 13, a coefficient substitution controller 15 but does not include the adaptive controller 4. In addition, an adaptive memory 10, a sum/product calculator 11 and a filter coefficient updator 14 in FIG. 13 comprises the adaptive filter 3 in FIG. 8. Therefore, there are structural difference between the conventional example in FIG. 13 and the conventional example in FIG. 8. The elements having the same reference numbers in FIG. 13 are the same portions or the corresponding portions in FIG. 8. Accordingly the detailed explanation of the same portions is omitted.
The adaptive memory 10 stores a first filter coefficient for updating which is generated from the transmitting signal and the residual signal after echo cancellation using algorithm. The refuge memory 13 stores the first filter coefficient which is to be stored in the adaptive memory 10 in parallel for a predetermined sections while the adaptation is judged to be proper. The coefficient substitution controller 15 controls whether the update of the filter coefficient used for the adaptation of the adaptive filter is proper or not, according to the difference between the transmitting signal level and the residual signal level.
First of all, the filter coefficient updator 14 updates the filter coefficient H (j) of the adaptive memory 10 from the transmission signal Tin (k) and the residual signal Res (k) according to a filter algorithm such as N-LMS method (learning identification method). The sum/product calculator 11 generates a pseudo echo signal by carrying out the convolution operation of the reception signal Rin (k) and the filter coefficient H (j) stored in the adaptive memory 10. On the other hand, the coefficient substitution controller 15 calculates transmission signal level Ltin (k) and the residual signal level Lres (k) according to formulas (6) and (2), respectively, and further calculates the difference Ds (k) between Ltin (k) and Lres (k) according to formula (7).                               Ltin          ⁢                      xe2x80x83                    ⁢                      (            k            )                          =                              log            10                    ⁢                      {                                          ∑                                  i                  =                                      k                    -                    L                    +                    1                                                  k                            ⁢                              Tin                ⁢                                  xe2x80x83                                ⁢                                                      (                    i                    )                                    2                                                      }                                              (        6        )            xe2x80x83Ds(k)=Ltin(k)xe2x88x92Lres(k)xe2x80x83xe2x80x83(7)
FIGS. 14Axcx9cFIG. 14C show timing charts of Ds (k), transfer processing and of substituting processing by the switching device 12. In FIG. 13 and FIG. 14B, H (6) shows the first filter coefficient of the adaptive memory 10, and Hm (j) shows the second filter coefficient of the refuge memory 13. If Ds (k) increases as shown in FIG. 13A, transfer timing pulses in FIG. 14B are generated in response to the increase of the Ds (k) and the first filter coefficient of the adaptive memory is transferred to the refuge memory 13 in order to store the first filter coefficient H (j) as a second filter coefficient Hm (j). On the other hand, if Ds (k) decreases as shown in FIG.13A, substitution timing pulses in FIG. 14C are generated in response to the decrease of the Ds (k) and the second filter coefficient of the refuge memory 13 is transferred to the adaptive memory 10 in order to substitute the second filter coefficient Hm (j) for the first filter coefficient H (j).
Next, coefficient substitution controller 15 monitors the time sequence of Ds (k). When the Ds (k) becomes larger, the coefficient substitution controller 15 judges that the adaptation of the adaptive filter is running correctly, and sends an order to the switching device 12 so as to transmit the first filter coefficient of the adaptive memory 10 to the refuge memory 13. Then the switching device 12 transmits the first filter coefficient to the refuge memory 13 according to the order. As a result, the first filter coefficient of the adaptive filter 10 is stored in the refuge memory 13 as a second filter coefficient.
On the other hand, when the Ds (k) becomes smaller, the coefficient substitution controller 15 judges that the adaptation of the adaptive filter is running incorrectly, and sends an order to the switching device 12 so as to substitute the first filter coefficient of adaptive memory 10 with the value of the second filter coefficient stored in the refuge memory 13. Then the switching device 12 transfers the second filter coefficient to the adaptive memory 10 according to the order.
In in the conventional echo canceller discussed above, double talk can not be detected properly. Therefore, a adaptation is deactivated even in the section where the adaptation should be carried out. Since the adaptation is deactivated frequently, the processing of the adaptation is slow and therefore the echo still remains without being canceled. There has been another problem that when the amount of the echo cancellation by the adaptive filter is small, the residual echo prevents clear listening.
It is an object of the present invention to obtain an echo canceller which judges the double talk section precisely and carries out the adequate adaptation.
It is another object of the present invention to obtain an echo canceller in which substitution value is not discontinuous and does not produce a noise at a moment of substitution, even when the filter coefficient in the adaptive memory is substituted by the refuge value.
According to one aspect of the invention, an echo canceller including an adaptation control means which includes an echo level estimating means, the echo level estimating means comprising a first level calculating means for calculating logarithmically converted power of a reception signal level; a second level calculating means for calculating logarithmically converted power of a transmission signal level; an echo gain estimation means for estimating an echo gain based on the reception signal level and the transmission signal level; and an echo level estimating means for adding the estimated echo gain to the reception signal level to obtain an estimated echo level.
According to another aspect of the invention, the echo canceller further comprises a third level calculating means for calculating logarithmically converted power of a residual signal level; and a comparison means for comparing the estimated echo level with the residual signal level after the echo cancellation; wherein the echo of the reception signal contained in the transmission signal is canceled when the estimated echo level exceeds the value obtained by adding a margin to the residual signal level.
According to further aspect of the invention, the echo canceller further comprises a comparison means for comparing the estimated echo level with the transmitting signal level; wherein the echo of the reception signal contained in the transmission signal is canceled when the estimated echo level exceeds the value obtained by subtracting a margin from the transmitting signal level.
According to further aspect of the invention, the echo canceller further comprises a third level calculating means for calculating logarithmically converted power of a residual signal level; a first comparison means for comparing the estimated echo level with a residual signal level after the echo cancellation; a second comparison means for comparing the estimated echo level with the transmission signal level; a flag selector for selecting an adaptive control flag outputted from the comparator and an adaptive control flag outputted from the comparator; and an echo cancellation amount estimating means for estimating an amount of echo cancellation from the transmission signal level and the residual signal level; wherein the echo of the reception signal included in the transmission signal is canceled if the estimated echo level exceeds the value obtained by adding the margin to the residual signal in case that the amount of the echo cancellation exceeds a threshold value, and the echo of the reception signal contained in the transmission signal is canceled if the estimated echo level exceeds the value obtained by subtracting a margin from the transmission signal in case that the amount of the echo cancellation does not exceed the threshold value.
According to still further aspect of the invention, an echo canceller comprises an adaptive memory for storing a first filter coefficient for adaptation which is updated from a transmission signal and a residual signal after echo cancellation; a refuge memory for storing a second filter coefficient in the adaptive memory in parallel for predetermined sections while the adaptation is judged to be proper; a coefficient substitution means for controlling whether the filter coefficient for the adaptation of the adaptive filter is needed to be updated or not according to the difference between the transmission signal and the residual signal level; an interpolating means for interpolating after comparing the value of the first filter coefficient in the adaptive memory with the value of the second filter coefficient in the refuge memory; a filter coefficient updator for updating the first filter coefficient of the adaptive memory according to the transmission signal and the residual signal; a sum/product calculator for generating a pseudo echo signal by carrying out the convolution operation according to the reception signal and the first filter coefficient stored in the adaptive memory; and an echo subtracter for subtracting the pseudo echo signal from the transmission signal to generate a residual signal; wherein, when the coefficient substitution mean controls to substitute the value of the first filter coefficient by the value of the second filter coefficient in case that the adaptation is not proper, and the interpolation means carries out interpolation and updates for a predetermined timing number so that the value of the first filter coefficient is continuous to the value of the second filter coefficient.